home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / nsclilib / ni_error.c < prev    next >
Text File  |  1996-07-05  |  6KB  |  160 lines

  1. /*
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:    ni_error.c
  27. *
  28. * Author:       Beatty, Gish
  29. *
  30. * Version Creation Date:        1/1/92
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description: 
  35. *
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. *
  42. *
  43. * ==========================================================================
  44. *
  45. *
  46. * RCS Modification History:
  47. * $Log: ni_error.c,v $
  48.  * Revision 4.0  1995/07/26  13:56:32  ostell
  49.  * force revision to 4.0
  50.  *
  51.  * Revision 1.12  1995/05/17  17:52:10  epstein
  52.  * add RCS log revision history
  53.  *
  54. */
  55.  
  56. #include "ni_error.h"
  57.     
  58. Char * NEAR ni_errlist[] = {
  59.     "no error",
  60.     "error",
  61.     "no entry for user",
  62.     "no entry for host",
  63.     "no entry for service",
  64.     "host address invalid",
  65.     "port number invalid",
  66.     "can't open socket",
  67.     "can't bind socket",
  68.     "accept socket failed",
  69.     "listen on socket failed",
  70.     "can't connect to dispatcher",
  71.     "can't connect to client",
  72.     "can't connect to application",
  73.     "maximum number of connections in use",
  74.     "select statement failed",
  75.     "message write failed",
  76.     "message read failed",
  77.     "message type unknown",
  78.     "fork failed",
  79.     "unable to set user ID",
  80.     "execute failed",
  81.     "unknown service",
  82.     "can't open file",
  83.     "error in configuration file",
  84.     "error parsing service entry",
  85.     "error parsing resource entry",
  86.     "service is unavailable",
  87.     "resource is unavailable",
  88.     "dispatcher disconnected",
  89.     "service disconnected",
  90.     "login failed",
  91.     "login timed out",
  92.     "dispatcher timed out",
  93.     "service timed out",
  94.     "command timed out",
  95.     "timed out",
  96.     "unable to make message handle",
  97.     "user not in group required for access",
  98.     "version requested not in valid range",
  99.     "name requested was not found",
  100.     "requested ID was not found",
  101.     "select returned unrequested fd",
  102.     "error using NIS service",
  103.     "invalid argument",
  104.     "child process exited abnormally",
  105.     "already running on this machine",
  106.     "attempt to set up pipe failed",
  107.     "i/o error on pipe",
  108.     "spawned server OK",
  109.     "spawned server failed",
  110.     "unable to parse string",
  111.     "service/resource type mismatch",
  112.     "dispatcher is acting as backup",
  113.     "client is not an authorized guest user",
  114.     "TCP stack initialization failure",
  115.     "no entry for local host",
  116.     "ASN.1 specification load failure",
  117.     "service does not support encryption",
  118.     "can't connect to brokered service",
  119.     "failure trying to perform public-key encryption",
  120.     "failure trying to perform public-key decryption",
  121.     "new encryption key was not accepted by user",
  122.     "mismatched new encryption key not accepted by user",
  123.     "unknown error"
  124. };
  125.  
  126. Char * NEAR ni_platform[] = {
  127.     "unknown",           /* NI_PLATFORM_UNKNOWN */
  128.     "Macintosh",         /* NI_PLATFORM_MAC */
  129.     "VMS (TGV)",         /* NI_PLATFORM_VMS_TGV */
  130.     "AXP/OpenVMS",       /* NI_PLATFORM_AXP_OPENVMS */
  131.     "Generic UNIX",      /* NI_PLATFORM_GENERIC_UNIX */
  132.     "IBM370 AIX",        /* NI_PLATFORM_IBM370AIX */
  133.     "Sun",               /* NI_PLATFORM_SUN */
  134.     "Alpha+OSF/1",       /* NI_PLATFORM_ALPHA_OSF1 */
  135.     "Mac AU/X",          /* NI_PLATFORM_AUX */
  136.     "Cray",              /* NI_PLATFORM_CRAY */
  137.     "Convex",            /* NI_PLATFORM_CONVEX */
  138.     "HP/UX",             /* NI_PLATFORM_HPUX */
  139.     "NEXT",              /* NI_PLATFORM_NEXT */
  140.     "SGI (MIPS)",        /* NI_PLATFORM_SGI */
  141.     "ULTRIX",            /* NI_PLATFORM_ULTRIX */
  142.     "DOS",               /* NI_PLATFORM_DOS */
  143.     "WIN16",             /* NI_PLATFORM_WIN16 */
  144.     "NEWT",              /* NI_PLATFORM_WIN_NEWT */
  145.     "PC-NFS",            /* NI_PLATFORM_WIN_PCNFS */
  146.     "WINSOCK",           /* NI_PLATFORM_WIN_WINSOCK */
  147.     "WIN NT",            /* NI_PLATFORM_WINNT */
  148.     "System V on Sparc", /* NI_PLATRFOM_SYSV_ON_SPARC */
  149.     "VMS (UCX)",         /* NI_PLATFORM_VMS_UCX */
  150.     "VMS (TWG)",         /* NI_PLATFORM_VMS_TWG */
  151.     "VMS (WPW)",         /* NI_PLATFORM_VMS_WPW */
  152.     "AIX",               /* NI_PLATFORM_AIX */
  153.     "LINUX",             /* NI_PLATFORM_LINUX */
  154. };
  155.  
  156. Uint2         ni_nerr = (Uint2) NIE_UNKNOWN;  /* number of errors */
  157. NI_ErrLevel   ni_errlev;                      /* error level - NOT SET on error */
  158. NI_Error      ni_errno;                       /* error number set by failing function */
  159. Char NEAR     ni_errtext[ERRTEXT_BUFSIZ];     /* additional error text buffer */
  160.